using System;
using System.Web.UI;

namespace TimeSheet.Protected.View
{
    /// <summary>
    /// A nice description of BaseControl goes here.
    /// 
    /// Version: $Id: BaseControl.cs,v 1.2 2004/05/18 15:32:24 jperrin Exp $
    /// 
    /// Date: 
    /// Copyright: 2004, Kanga Communications, Calgary, Alberta, Canada. 
    /// </summary>
    public class BaseControl : UserControl
    {
        protected virtual long RequestedEntityID
        {
            get
            {
                if (Request["id"] == null)
                {
                    return -1;
                }
                return Convert.ToInt64(Request["id"]);
            }
        }

        protected virtual TimeSheetBLL.Administrator CurrentAdministrator
        {
            get
            {
                return
                    Session[AppSettings.AdministratorSessionName] as
                    TimeSheetBLL.Administrator;
            }
            set { Session[AppSettings.AdministratorSessionName] = value; }
        }
    }
}